Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix Engagement flags fix. #65

Merged

Conversation

lycanlee
Copy link
Contributor

@lycanlee lycanlee commented Mar 2, 2022

Pull Request
Are you a current Fivetran customer?

Matt Lee, Senior Data Engineer, Atmos Inc. I am currently trialing Fivetran. I am a previous customer at Prodigy Education.

What change(s) does this PR introduce?
This is a bug fix which should allow for flags to be set for engagements to actually compile correctly. For example when providing hubspot_engagement_company_enabled: false you get an error:

16:46:28  83 of 91 START table model dbt_mlee_hubspot.hubspot__engagement_calls........... [RUN]
16:46:29  83 of 91 ERROR creating table model dbt_mlee_hubspot.hubspot__engagement_calls.. [ERROR in 0.63s]
Database Error in model hubspot__engagement_calls (models/sales/engagement_events/hubspot__engagement_calls.sql)
  000904 (42000): SQL compilation error: error line 26 at position 8
  invalid identifier 'ENGAGEMENTS.COMPANY_IDS'
  compiled SQL at target/run/hubspot/models/sales/engagement_events/hubspot__engagement_calls.sql

This is because macros/engagements_join.sql blindly selects columns which may not exist in hubspot__engagements.

Did you update the CHANGELOG?

  • Yes
    Not Yet, will do as reviewed.

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)
    This should not be a breaking change as it is just wrapping a select with conditionals that may or may not exist. This is fixing a bug that is preventing the flags from currently existing.

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

  • Yes, Issue/Feature [link bug/feature number here]
  • No

How did you test the PR changes?

  • CircleCi
  • Local (please provide additional testing details below)
    Ran with flags enabled locally and the above changes to ensure compilation error no longer existed.

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

💃

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

@lycanlee lycanlee changed the title add if enabled vars statement to select. Bugfix Engagement flags fix. Mar 2, 2022
@fivetran-joemarkiewicz
Copy link
Contributor

Hi @lycanlee, thanks so much for opening this PR! I really appreciate your collaboration on dbt Slack and for helping contribute to the open source project with this PR 😃!

The first cursory glance of this PR looks good, but I will have someone from my team give a more detailed review and test these changes at the start of our next sprint (starting mid next week). Once reviewed and approved we can plan to move this into the next release of the package!

Let me know if you have any questions in the meantime.

@lycanlee
Copy link
Contributor Author

Wanted to check if there has been any movement on this?

@fivetran-joemarkiewicz
Copy link
Contributor

Wanted to check if there has been any movement on this?

Hey @lycanlee I apologize for the delay. This is being reviewed this current sprint!

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Circle CI testing done& passed via a branch off the customer branch. https://github.com/fivetran/dbt_hubspot/compare/bugfix/engagement_enabled_vars

@fivetran-reneeli fivetran-reneeli merged commit 2c8c15a into fivetran:main Mar 14, 2022
@fivetran-reneeli
Copy link
Contributor

Hi @lycanlee, thank you so much for submitting this PR! I tested it and updated relevant docs; your branch has now been merged to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants